package com.four.hospital.controller;

import com.four.common.utils.R;
import com.four.hospital.entity.Disease;
import com.four.hospital.service.DiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author:wsy
 * @Date: 2022/01/14/8:46
 * @Description
 */
@RestController
@RequestMapping("hospital/disease")
public class DiseaseController {

    @Autowired
    private DiseaseService diseaseService;

    /**
     * 查询次数前三
     * @return
     */
    @GetMapping("/getDiseaseThree")
    public R getDiseaseThree(){
        List<Disease> diseaseList=diseaseService.getDiseaseThree();
        return R.ok().put("diseaseList",diseaseList);
    }
}
